

#delimit;



#delimit;
set more off;

cd "C:\....\Replication files";
	
use "ENMI - replication.dta", clear;

		

#delimit;
		
xtreg pvote
	c.ensh_mi##i.inc_cab_l, fe robust;
	estimates store ml_simple;
	
	
		
xtreg pvote
	c.ensh_mi##i.inc_cab_l pvote_l
	c.unemployment##i.inc_cab_l 
	
	c.moderate##i.inc_cab_l
 majelect  
  , fe robust  ;
 
estimates store ml_full_fe;	

testnl _b[c.ensh_mi#1.inc_cab_l] + _b[c.ensh_mi]
== _b[c.ensh_mi] ;

		 

	

				#delimit;
set more off;
xtreg pvote
	1.inc_cab_l#c.ensh_mi pvote_l unemployment
	1.inc_cab_l#c.moderate 
	 majelect 
  if inc_cab_l==1 , fe robust;
		
testnl _b[c.ensh_mi#1.inc_cab_l] == 0 ;

		estimates store ml_onlyincumbents_fe;
		
						#delimit;

						
xtreg pvote
	c.ensh_mi unemployment pvote_l
	moderate 1.nparty
		 majelect federal directpres 
		
		if inc_cab_l==0 , fe robust ;
	
	testnl _b[c.ensh_mi] == 0 ;
	
		estimates store ml_onlyopposition_fe;



	

#delimit;
 esttab ml_onlyopposition_fe ml_onlyincumbents_fe  ml_full_fe  
	using "figures\Table A16 - Unemployment rate.rtf", replace 
		b (%10.3f) se scalars("aic AIC" "bic BIC" "rmse Root Mean Squared Error" "chi2 \u0935?{\super 2}" "ll Log-Likelihood" ) 
		obslast star(+ 0.10 * 0.05 ** 0.01 *** 0.001)
		label mtitles (  "Opposition" "Incumbents" "Full") nogaps
title (\label{})
		
		
order(ensh_mi 
1.inc_cab_l#c.ensh_mi 
moderate 
1.inc_cab_l#c.moderate 
unemployment
1.inc_cab_l#c.unemployment 
1.inc_cab_l 

majelect pvote_l _cons ) 

keep(ensh_mi 1.inc_cab_l 
1.inc_cab_l#c.ensh_mi unemployment
1.inc_cab_l#c.unemployment 1.inc_cab_l#c.moderate 
moderate majelect 
pvote_l _cons )  

coeflabels(
ensh_mi "ENMI"  
1.inc_cab_l "Incumbent"
1.inc_cab_l#c.ensh_mi "Incumbent X ENMI"
unemployment "Unemployment Rate" 
1.inc_cab_l#c.unemployment "Incumbent X Unemployment Rate"
1.inc_cab_l#c.moderate "Incumbent X Moderated Position"
moderate "Moderated Position"
majelect "Majoritarian Election"
pvote_l "% Vote{\sub t-1}"
_cons "Constant");


